#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int main()
{

    int n, x = 0, y = 0, sumX = 0, sumY = 0;
    scanf("%d", &n);
    for (int i = 0; i < n; i++) {
        scanf("%d %d", &x, &y);
        sumX += x;
        sumY += y;
    }
    printf("%d %d", sumX, sumY); return 0;
    return 0;
}